<template>
  <div>
    <ul class="media-wrap">
      <li v-for="(item, index) in formData" :key="index">
        <div class="item">
          <div class="desc">{{ item.title }}</div>
          <p>{{ item.fullName }}</p>
        </div>
        <div class="item">
          <div class="desc">单位</div>
          <p>{{ item.unit }}</p>
        </div>
        <div class="item">
          <div class="desc">职务</div>
          <p>{{ item.job }}</p>
        </div>
        <div class="item">
          <div class="desc">联系方式</div>
          <p>{{ item.phone }}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import {getBatchDict} from "@/services/system/api"
import {interfaceExtraDic} from "@/services/system/apiLog";
import {getInfoForResponsibility} from "@/services/system/whdngxlApi";

export default {
  data() {
    return {
      dictData: {},
      editFlag: true,
      form: {
        b0101: null,
        b0107: "",
        b0108: "",
        b0117: "",
        b0118: "",
        b0104: "",
        b0105: "",
        b0106: "",
        b0115: "",
        b0114: "",
        b0113: "",
        b0116: "",
        b0109: "",
        b0111: "",
        b0112: ""
      },
      labelCol: {
        xs: {span: 24},
        sm: {span: 8}
      },
      wrapperCol: {
        xs: {span: 24},
        sm: {span: 16}
      },
      formData: []
    }
  },
  created() {
  },
  methods: {
    init(b0101) {
      const params = {}
      params.dictFields = 'AAB301,AAA027'
      /*  this.$http.post(getBatchDict, params).then(res => {
          let resultData = JSON.parse(JSON.stringify(this.dictData));
          resultData.AAA027 = res.result.AAA027
          resultData.AAB301 = res.result.AAB301
          resultData.ckeckToken = [{dictKey: "0", dictValue: "不校验"}, {dictKey: "1", dictValue: "校验"},]
          resultData.checkScope = [{dictKey: "0", dictValue: "不校验"}, {dictKey: "1", dictValue: "校验"},]
          this.dictData = resultData
        })
        params.dictFields = 'APPORG'
        this.$http.post(interfaceExtraDic, params).then(res => {
          let resultData = JSON.parse(JSON.stringify(this.dictData));
          resultData.APPORG = res.result.APPORG
          this.dictData = resultData
        })*/
      this.$http.post(getInfoForResponsibility, {b0101: b0101}).then((res) => {
        console.log(res.result)
        this.formData = res.result
      })

    },
  }
}
</script>
<style lang="less" scoped>
.media-wrap {
  margin-top: 15px;
  li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
    .item {
      flex: 0 0 auto;
      width: 18%;
      .desc {
        width: 100%;
        height: 21px;
        line-height: 21px;
        font-weight: bold;
        margin-bottom: 10px;
      }
      p {
        width: 100%;
        height: 32px;
        line-height: 30px;
        padding: 0 10px;
        border: 1px solid #3e9fc8;
        border-radius: 4px;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .btn-wrap {
        text-align: center;
      }
      img {
        width: auto;
        height: 90px;
        max-width: 98%;
        vertical-align: middle;
        cursor: pointer;
      }
      &.special {
        width: 5%;
      }
    }
  }
}
</style>
